const router = require('koa-router')();
const circle = require('../modules/circle');

//获取数据
router.get('/circle',async (ctx,next) => {
    ctx.body = await circle.selectCircle();  
})
//增加数据
router.post('/circle',async (ctx,next) => {
    ctx.body = await circle.addCircle(ctx.request.body)
})
//删除数据
router.delete('/circle/:key0',async (ctx,next) => {
    ctx.body = await circle.deleteCircle(ctx.params);
})
//修改数据
router.put('/circle',async (ctx,next) => {
    ctx.body = await circle.putCircle(ctx.request.body)
})

module.exports = router;